<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新闻列表</title>
    <link rel="stylesheet" href="../public/css/index.css">
</head>
<body>
    <ul >
        <% news.forEach((item,index)=>{ %> 
        <li onclick="goToDetail('<%= item.url%>')">
            <h1> <%= item.title %> </h1>
            <div class="imgs">
                <img src="<%= item.thumbnail_pic_s%>" alt="">
                <img src="<%= item.thumbnail_pic_s02%>" alt="">
                <img src="<%= item.thumbnail_pic_s03%>" alt="">
            </div>
            <div class="others">
                <div>
                    <span><%= item.author_name %></span><span><%= item.date %></span>
                </div>
                <div class="close">
                    <span>x</span>
                </div>
               
            </div>
        </li>
        <% }) %> 
    </ul>
</body>

<script >
    

    function goToDetail(url){
        // location.href=url
        window.location.href=url
    }
</script>
</html>